#!/bin/bash
exec_path=`pwd`

while true
do
   for i in {1..1}
   do
       exec_command="ps -ef | grep '$exec_path/pickPages.php $i' | grep -v grep | wc -l"
       count=$(eval $exec_command)
       if [ $count -lt "1" ];then
           nohup php $exec_path/pickPages.php $i > /dev/null &
       fi
   done

   sleep 1
done
